<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        var Test = new function(){
            var num=1;
            this.eat=function(){console.log(this.num)};
        }

    </script>
</body>
</html>